package com.itbaizhan.dao.impl;

import com.itbaizhan.dao.ItemDao;
import com.itbaizhan.pojo.Item;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author spf
 * @date 2024/3/6
 * @time 19:27
 */
@Repository
public class ItemDaoImpl implements ItemDao {

    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public Item get(String key) {
        return (Item) redisTemplate.opsForValue().get(key);
    }
}
